package com.tuanzi.loan.business.repository.family;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;

import com.tuanzi.loan.business.entity.family.UserCreditRecord;
import com.tuanzi.loan.business.entity.family.UserCreditRecordSourceType;

/**
 * @author Ray 2017/09/21
 */
public interface UserCreditRecordRepository extends JpaRepository<UserCreditRecord, Long> {

	List<UserCreditRecord> findAllByUserId(Long userId);

	List<UserCreditRecord> findAllByPhoneAndNameAndIdCard(String phone, String name, String idCard);

	List<UserCreditRecord> findAllByPhoneInAndSourceType(List<String> phone, UserCreditRecordSourceType sourceType);

	List<UserCreditRecord> findAllByUserIdAndSourceType(Long userId, UserCreditRecordSourceType sourceType);

}
